﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace lib
{
    public class ListNode
    {
        public int val;
        public ListNode next;
        public ListNode(int x) { val = x; }

        public static void Print(ListNode node)
        {
            Console.WriteLine(node.val);
            if (node.next != null)
            {
                Print(node.next);
            }
        }
    }
}
